home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / fld2_16 / ejfold.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-12-28  |  14.1 KB  |  425 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00808080&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Example of FOLDERS-II v1.6"
  6.    ClientHeight    =   4548
  7.    ClientLeft      =   1020
  8.    ClientTop       =   1536
  9.    ClientWidth     =   5832
  10.    ForeColor       =   &H00000000&
  11.    Height          =   4992
  12.    KeyPreview      =   -1  'True
  13.    Left            =   960
  14.    LinkTopic       =   "Form1"
  15.    ScaleHeight     =   4548
  16.    ScaleWidth      =   5832
  17.    Top             =   1152
  18.    Width           =   5952
  19.    Begin PictureBox Picture1 
  20.       Height          =   264
  21.       Index           =   0
  22.       Left            =   4680
  23.       ScaleHeight     =   240
  24.       ScaleWidth      =   240
  25.       TabIndex        =   13
  26.       TabStop         =   0   'False
  27.       Top             =   3924
  28.       Width           =   264
  29.    End
  30.    Begin PictureBox InsidePicture 
  31.       Height          =   408
  32.       Index           =   3
  33.       Left            =   5292
  34.       ScaleHeight     =   384
  35.       ScaleWidth      =   420
  36.       TabIndex        =   12
  37.       TabStop         =   0   'False
  38.       Tag             =   "Tabs1"
  39.       Top             =   3240
  40.       Width           =   444
  41.    End
  42.    Begin PictureBox InsidePicture 
  43.       AutoSize        =   -1  'True
  44.       Height          =   408
  45.       Index           =   2
  46.       Left            =   4860
  47.       Picture         =   EJFOLD.FRX:0000
  48.       ScaleHeight     =   384
  49.       ScaleWidth      =   384
  50.       TabIndex        =   11
  51.       Tag             =   "Tabs1"
  52.       Top             =   3240
  53.       Visible         =   0   'False
  54.       Width           =   408
  55.    End
  56.    Begin PictureBox InsidePicture 
  57.       AutoSize        =   -1  'True
  58.       Height          =   408
  59.       Index           =   1
  60.       Left            =   4428
  61.       Picture         =   EJFOLD.FRX:0442
  62.       ScaleHeight     =   384
  63.       ScaleWidth      =   384
  64.       TabIndex        =   10
  65.       Tag             =   "Tabs1"
  66.       Top             =   3240
  67.       Visible         =   0   'False
  68.       Width           =   408
  69.    End
  70.    Begin PictureBox InsidePicture 
  71.       AutoSize        =   -1  'True
  72.       Height          =   408
  73.       Index           =   0
  74.       Left            =   3996
  75.       Picture         =   EJFOLD.FRX:0744
  76.       ScaleHeight     =   384
  77.       ScaleWidth      =   384
  78.       TabIndex        =   9
  79.       Tag             =   "Tabs1"
  80.       Top             =   3240
  81.       Visible         =   0   'False
  82.       Width           =   408
  83.    End
  84.    Begin PictureBox Picture1 
  85.       Height          =   264
  86.       Index           =   1
  87.       Left            =   5040
  88.       ScaleHeight     =   240
  89.       ScaleWidth      =   240
  90.       TabIndex        =   8
  91.       TabStop         =   0   'False
  92.       Top             =   3924
  93.       Width           =   264
  94.    End
  95.    Begin SSPanel Panel3D 
  96.       Alignment       =   0  'Left Justify - TOP
  97.       BevelWidth      =   2
  98.       BorderWidth     =   1
  99.       Caption         =   "Tab &4\$With two lines"
  100.       FloodColor      =   &H00C0C0C0&
  101.       Height          =   2928
  102.       Index           =   3
  103.       Left            =   648
  104.       Outline         =   -1  'True
  105.       TabIndex        =   3
  106.       Tag             =   "Tabs1"
  107.       Top             =   3672
  108.       Width           =   3288
  109.       Begin SSFrame Frame3D1 
  110.          Caption         =   "something"
  111.          Height          =   2316
  112.          Left            =   180
  113.          TabIndex        =   5
  114.          Top             =   396
  115.          Width           =   2928
  116.          Begin ComboBox Combo1 
  117.             BackColor       =   &H00C0C0C0&
  118.             Height          =   1452
  119.             Left            =   144
  120.             Style           =   1  'Simple Combo
  121.             TabIndex        =   6
  122.             TabStop         =   0   'False
  123.             Top             =   540
  124.             Width           =   2676
  125.          End
  126.       End
  127.    End
  128.    Begin SSPanel Panel3D 
  129.       Alignment       =   0  'Left Justify - TOP
  130.       BevelWidth      =   2
  131.       BorderWidth     =   1
  132.       FloodColor      =   &H00C0C0C0&
  133.       Height          =   2928
  134.       Index           =   2
  135.       Left            =   468
  136.       Outline         =   -1  'True
  137.       TabIndex        =   2
  138.       Tag             =   "Tabs1"
  139.       Top             =   3456
  140.       Width           =   3252
  141.       Begin ListBox List1 
  142.          Height          =   2328
  143.          Left            =   216
  144.          TabIndex        =   7
  145.          TabStop         =   0   'False
  146.          Top             =   360
  147.          Width           =   2748
  148.       End
  149.    End
  150.    Begin SSPanel Panel3D 
  151.       Alignment       =   0  'Left Justify - TOP
  152.       BevelWidth      =   2
  153.       BorderWidth     =   1
  154.       Caption         =   "Tab &1 (this is being cut)"
  155.       FloodColor      =   &H00C0C0C0&
  156.       Height          =   2928
  157.       Index           =   1
  158.       Left            =   288
  159.       Outline         =   -1  'True
  160.       TabIndex        =   1
  161.       Tag             =   "Tabs1"
  162.       Top             =   3240
  163.       Width           =   3288
  164.       Begin CommandButton Command2 
  165.          Caption         =   "Change Folder 1"
  166.          Height          =   336
  167.          Left            =   792
  168.          TabIndex        =   16
  169.          Top             =   1440
  170.          Width           =   1524
  171.       End
  172.       Begin PictureBox Picture2 
  173.          AutoSize        =   -1  'True
  174.          Height          =   624
  175.          Left            =   1080
  176.          Picture         =   EJFOLD.FRX:0A46
  177.          ScaleHeight     =   600
  178.          ScaleWidth      =   960
  179.          TabIndex        =   14
  180.          Top             =   612
  181.          Width           =   984
  182.       End
  183.       Begin Label Label1 
  184.          BackStyle       =   0  'Transparent
  185.          Caption         =   "Use this button to change the active Tab in Folder 1 (inside Folder 0, Tab0)."
  186.          Height          =   732
  187.          Left            =   252
  188.          TabIndex        =   18
  189.          Top             =   1980
  190.          Width           =   2748
  191.       End
  192.    End
  193.    Begin SSPanel Panel3D 
  194.       Alignment       =   0  'Left Justify - TOP
  195.       BevelWidth      =   2
  196.       BorderWidth     =   1
  197.       Caption         =   "Tab &0\$With three\$lines"
  198.       FloodColor      =   &H00C0C0C0&
  199.       Height          =   2928
  200.       Index           =   0
  201.       Left            =   288
  202.       Outline         =   -1  'True
  203.       RoundedCorners  =   0   'False
  204.       TabIndex        =   0
  205.       Tag             =   "Tabs1"
  206.       Top             =   216
  207.       Width           =   5412
  208.       Begin PictureBox folder1_container 
  209.          BackColor       =   &H00C0C0C0&
  210.          BorderStyle     =   0  'None
  211.          Height          =   1956
  212.          Left            =   216
  213.          ScaleHeight     =   1956
  214.          ScaleWidth      =   3072
  215.          TabIndex        =   22
  216.          Top             =   864
  217.          Width           =   3072
  218.          Begin SSPanel folder2 
  219.             Alignment       =   0  'Left Justify - TOP
  220.             BevelWidth      =   2
  221.             BorderWidth     =   1
  222.             Caption         =   "Folder 1 Tab 1"
  223.             FloodColor      =   &H00FF00FF&
  224.             Height          =   1380
  225.             Index           =   1
  226.             Left            =   108
  227.             Outline         =   -1  'True
  228.             TabIndex        =   27
  229.             Tag             =   "Tabs2"
  230.             Top             =   504
  231.             Width           =   2172
  232.             Begin SSCheck Check3D3 
  233.                Caption         =   "something 1"
  234.                Height          =   264
  235.                Left            =   396
  236.                TabIndex        =   29
  237.                TabStop         =   0   'False
  238.                Top             =   360
  239.                Width           =   1344
  240.             End
  241.             Begin SSCheck Check3D4 
  242.                Caption         =   "something 2"
  243.                Height          =   264
  244.                Left            =   396
  245.                TabIndex        =   28
  246.                TabStop         =   0   'False
  247.                Top             =   756
  248.                Width           =   1416
  249.             End
  250.          End
  251.          Begin PictureBox Picture1 
  252.             Height          =   264
  253.             Index           =   2
  254.             Left            =   2592
  255.             ScaleHeight     =   240
  256.             ScaleWidth      =   240
  257.             TabIndex        =   26
  258.             TabStop         =   0   'False
  259.             Top             =   1512
  260.             Width           =   264
  261.          End
  262.          Begin PictureBox Picture1 
  263.             Height          =   264
  264.             Index           =   3
  265.             Left            =   2304
  266.             ScaleHeight     =   240
  267.             ScaleWidth      =   240
  268.             TabIndex        =   25
  269.             TabStop         =   0   'False
  270.             Top             =   1512
  271.             Width           =   264
  272.          End
  273.          Begin SSPanel folder2 
  274.             Alignment       =   0  'Left Justify - TOP
  275.             BevelWidth      =   2
  276.             BorderWidth     =   1
  277.             Caption         =   "&Folder 1, Tab 0"
  278.             FloodColor      =   &H00400040&
  279.             ForeColor       =   &H00FFFFFF&
  280.             Height          =   1488
  281.             Index           =   0
  282.             Left            =   0
  283.             Outline         =   -1  'True
  284.             TabIndex        =   23
  285.             Tag             =   "Tabs2"
  286.             Top             =   0
  287.             Width           =   2928
  288.             Begin TextBox Text2 
  289.                Height          =   876
  290.                Left            =   144
  291.                MultiLine       =   -1  'True
  292.                TabIndex        =   24
  293.                TabStop         =   0   'False
  294.                Text            =   "Example of folder inside folder and with colored tabs."
  295.                Top             =   360
  296.                Width           =   2604
  297.             End
  298.          End
  299.       End
  300.       Begin PictureBox fixed_controls_picture 
  301.          BackColor       =   &H00C0C0C0&
  302.          BorderStyle     =   0  'None
  303.          Height          =   1416
  304.          Left            =   3312
  305.          ScaleHeight     =   1416
  306.          ScaleWidth      =   2028
  307.          TabIndex        =   19
  308.          Top             =   1404
  309.          Width           =   2028
  310.          Begin CommandButton Command4 
  311.             BackColor       =   &H00FF0000&
  312.             Caption         =   "Move to 0,0"
  313.             Height          =   372
  314.             Left            =   108
  315.             TabIndex        =   15
  316.             Top             =   936
  317.             Width           =   1812
  318.          End
  319.          Begin CommandButton tabcontrol 
  320.             BackColor       =   &H00FF0000&
  321.             Caption         =   "En/Dis-able Tab 1"
  322.             Height          =   372
  323.             Left            =   108
  324.             TabIndex        =   21
  325.             TabStop         =   0   'False
  326.             Top             =   36
  327.             Width           =   1812
  328.          End
  329.          Begin CommandButton Command3 
  330.             BackColor       =   &H00FF0000&
  331.             Caption         =   "En/Dis-able Folder"
  332.             Height          =   372
  333.             Left            =   108
  334.             TabIndex        =   20
  335.             Top             =   504
  336.             Width           =   1812
  337.          End
  338.       End
  339.       Begin CommandButton Command5 
  340.          Caption         =   "Second Form"
  341.          Height          =   372
  342.          Left            =   3564
  343.          TabIndex        =   17
  344.          Top             =   396
  345.          Width           =   1488
  346.       End
  347.       Begin CommandButton Command1 
  348.          Caption         =   "This is Folder 0"
  349.          Height          =   372
  350.          Left            =   288
  351.          TabIndex        =   4
  352.          TabStop         =   0   'False
  353.          Top             =   396
  354.          Width           =   1632
  355.       End
  356.    End
  357. Option Explicit
  358. Sub Command1_Click ()
  359.     Dim s As String
  360.     Dim crlf As String
  361.     crlf$ = Chr$(13) & Chr$(10)
  362.     s$ = "Left   = " & FolderLeft(0) & crlf$
  363.     s$ = s$ & "Top    = " & FolderTop(0) & crlf$
  364.     s$ = s$ & "Width  = " & FolderWidth(0) & crlf$
  365.     s$ = s$ & "Height = " & FolderHeight(0) & crlf$
  366.     MsgBox s$, 0, "Folder Data"
  367. End Sub
  368. Sub Command2_Click ()
  369.     GotoFolder 1, 1 - CurrentTab(1)
  370. End Sub
  371. Sub Command3_Click ()
  372.     If folderenabled(0) Then
  373.         FolderDisable 0
  374.     Else
  375.         FolderEnable 0
  376.     End If
  377. End Sub
  378. Sub Command4_Click ()
  379.     FolderMove 0, 0, 0
  380. End Sub
  381. Sub Command5_Click ()
  382.     form2.Show 1
  383. End Sub
  384. Sub Form_KeyUp (keycode As Integer, Shift As Integer)
  385.     keycode = GotoFolderByAccel(0, keycode, Shift)
  386.     keycode = GotoFolderByAccel(1, keycode, Shift)
  387. End Sub
  388. Sub Form_Load ()
  389.     Dim success As Integer
  390.     Move (screen.Width - Width) \ 2, (screen.Height - Height) \ 2
  391.     list1.AddItem "This Tab doesn't have"
  392.     list1.AddItem " caption but it has"
  393.     list1.AddItem " a graphic."
  394.     combo1.AddItem "This Tab doesn't have"
  395.     combo1.AddItem " a graphic."
  396.     success = DefineFolders(0, 3, panel3d(0), "Tabs1", picture1(0), picture1(1), Nothing, &H600, 12, 0, True, True, 0)
  397.     SetFixedControl 0, fixed_controls_picture
  398.     success = DefineFolders(1, 2, Folder2(0), "Tabs2", picture1(2), picture1(3), folder1_container, &H1, 0, 0, False, False, -12)
  399.     'TightenForm 0, 0, True ' Best effect if first folder has only one row
  400. End Sub
  401. Sub Form_Unload (Cancel As Integer)
  402.     ResetFixedControls 0
  403.     End
  404. End Sub
  405. Sub Picture1_MouseUp (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  406.     Dim i As Integer
  407.     Dim a As Long
  408.     Dim b As Long
  409.     Select Case Index
  410.         Case 0:
  411.             FolderClick 0, Button, X, Y
  412.         Case 2:
  413.             i = FolderClicked(1, X, Y) ' Example of FolderClicked()
  414.             If i > -1 Then MsgBox "Clicked Tab " & i, 0, "FEATURE!"
  415.             FolderClick 1, Button, X, Y
  416.     End Select
  417. End Sub
  418. Sub tabcontrol_Click ()
  419.     If tabenabled(0, 0) Then
  420.         TabDisable 0, 0
  421.     Else
  422.         TabEnable 0, 0
  423.     End If
  424. End Sub
  425.